package com.md03.controller;

import com.md03.entity.Teacher;
import com.md03.service.TeacherService;
import lombok.Data;

@Data
public class TeacherController {
    //服务员要依赖于厨师，从厨师那里得到菜品
    private TeacherService teacherService;//接口

    public Teacher orderTeacher(int id) {
        Teacher teacher = teacherService.getOneTeacherById(id);
        return teacher;

    }

    public String deleteTeacher(int id) {
        Boolean rs = teacherService.deleteOneTeacherById(id);
        return rs ? "删除成功" : "删除失败";

    }
}
